<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1,user-scalable=no">
  <meta charset="UTF-8">
  <title>flex scroll layout example</title>
</head>
<style>
* {
  margin: 0;
  box-sizing: border-box;
}
.app {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
}
.top{
  height: 50px;
  padding: 10px 50px;
  width: 100%;
  background: #faa3ef;
}
.main {
  flex: 1;
  /* flex-shrink: 0; */
  
  /* 方式一 设置flex-shrink为0，设置height为0 */
  /* height: 0; */

  /* 方式二 设置overflow: auto */
  overflow: auto;
  /* overflow: scroll; */

  width: 100%;
  display: flex;
}
.main_left {
  height: 100%;
  flex: 0 0 250px;
  overflow: auto;
}
.menu {
  height: 400px;
  text-align: center;
  padding: 20px;
  margin-bottom: 20px;
  background: aliceblue;
}
.menu:last-child {
  margin-bottom: 0;
}

.main_right {
  flex: 1;
  
  /* 方式一 设置flex-shrink为0，设置width为0 */
  /* flex-shrink: 0; */
  /* width: 0; */

  /* 方式二 设置overflow: scroll */
  /* overflow: scroll; */
  overflow: auto;

  display: flex;
  flex-direction: column;
}
.main_right_top {
  height: 50px;
  padding: 10px 50px;
}
.main_right_bottom {
  flex: 1;
  overflow: auto;
}
.page {
  width: 2000px;
  height: 2000px;
  padding: 10px;
  overflow: scroll;
  border: 5px dashed red;
}
</style>
<body>
<div class="app">
  <div class="top">标题 app one screen layout example</div>
  <div class="main">
    <div class="main_left">
      <div class="menu">菜单1</div>
      <div class="menu">菜单2</div>
      <div class="menu">菜单3</div>
      <div class="menu">菜单4</div>
      <div class="menu">菜单5</div>
      <div class="menu">菜单6</div>
    </div>
    <div class="main_right">
      <div class="main_right_top">子页面标题</div>
      <div class="main_right_bottom">
        <div class="page">可左右上下拖动的子页面</div>
      </div>
    </div>
  </div>
</div>
</body>
</html>
